package com.wangp.designpattern.singleton;

public  class SingletonTest {

    public static void main(String[] args) {

        HungerSingletonModel instance1 = HungerSingletonModel.getInstance();
        HungerSingletonModel instance2 = HungerSingletonModel.getInstance();

        System.out.println(instance1==instance2);

        LazySingletonModel instance11 = LazySingletonModel.getInstance();
        LazySingletonModel instance22= LazySingletonModel.getInstance();

        System.out.println(instance11==instance22);
    }
}